using System.Collections.Generic;

namespace com.adjust.sdk
{
	public class AdjustThirdPartySharing
	{
		internal bool? isEnabled;

		internal Dictionary<string, List<string>> granularOptions;

		internal Dictionary<string, List<string>> partnerSharingSettings;

		public AdjustThirdPartySharing(bool? isEnabled)
		{
			this.isEnabled = isEnabled;
			granularOptions = new Dictionary<string, List<string>>();
			partnerSharingSettings = new Dictionary<string, List<string>>();
		}

		public void addGranularOption(string partnerName, string key, string value)
		{
			if (partnerName != null && key != null && value != null)
			{
				List<string> list;
				if (granularOptions.ContainsKey(partnerName))
				{
					list = granularOptions[partnerName];
				}
				else
				{
					list = new List<string>();
					granularOptions.Add(partnerName, list);
				}
				list.Add(key);
				list.Add(value);
			}
		}

		public void addPartnerSharingSetting(string partnerName, string key, bool value)
		{
			if (partnerName != null && key != null)
			{
				List<string> list;
				if (partnerSharingSettings.ContainsKey(partnerName))
				{
					list = partnerSharingSettings[partnerName];
				}
				else
				{
					list = new List<string>();
					partnerSharingSettings.Add(partnerName, list);
				}
				list.Add(key);
				list.Add(value.ToString());
			}
		}
	}
}
